#ifndef EthSeriesCoinApi_hpp
#define EthSeriesCoinApi_hpp

#include "../common/BaseCoinApi.hpp"
#include "../common/ChildNumber.hpp"
#include "../common/Netparams.hpp"
#include "../common/BtWallet.hpp"
#include "../common/CreateSignTransactionParams.hpp"

#include <vector>
#include <string>
#include <iostream>
#include <map>
#include <bitcoin/bitcoin.hpp>
#include "ChildNumber.hpp"
#include "../utils/Common.h"


using namespace bc;
using namespace bc::wallet;
using namespace bc::chain;
using namespace bc::machine;
using namespace std;

class EthSeriesCoinApi : public BaseCoinApi
{
public:
    bool createWalltByPassword(vector<string> words, string password, vector<ChildNumber> path, NetParams netparams, BtWallet& bw);
    string getPriKeyFromBtSeed(BtSeed btSeed, string password, vector<ChildNumber> path, NetParams netparams);

    bool createSignTransaction(CreateSignTransactionParams* params, vector<ChildNumber> path, NetParams netparams, map<string, string>& resultMap);
    bool validateAddress(const string& address);
private:
    string getAddress(data_chunk dc, CoinType coinType, NetworkType netType, vector<ChildNumber> path, NetParams netparams);
    string getPrivate(data_chunk dc, CoinType coinType, NetworkType netType, vector<ChildNumber> path, NetParams netparams);

    //--v2
    string getAddressV2(data_chunk dc, CoinType coinType, NetworkType netType, vector<ChildNumber> path, NetParams netparams);
    string getPrivateV2(data_chunk dc, CoinType coinType, NetworkType netType, vector<ChildNumber> path, NetParams netparams);
};
#endif